package com.golang.api.common;

public enum ActivityStatusType {

    NotOpen("未开放",0),

    SignUp("报名中",1),
    Progress("进行中",2),
    End("已结束",3),
    Cancel("取消",4);



    ActivityStatusType(String showName, Integer dbType) {
        this.showName = showName;
        this.dbType = dbType;
    }



    public static ActivityStatusType getByDbType(Integer status) {
        ActivityStatusType type = null;
        switch (status) {
            case 0:
                type = ActivityStatusType.NotOpen;
                break;
            case 1:
                type = ActivityStatusType.SignUp;
                break;
            case 2:
                type = ActivityStatusType.Progress;
                break;
            case 3:
                type = ActivityStatusType.End;
                break;
            case 4:
                type = ActivityStatusType.Cancel;
                break;
            default:
                ;
        }

        return type;

    }



    private String showName;

    public String getShowName() {
        return showName;
    }

    private Integer dbType;

    public Integer getDbType() {
        return dbType;
    }


    }
